package zyn_hy_login;

public class Scheck
{
	private HttpCookieCollection ck;
	private HttpResponse hr;
	private Page pg;
	private String reStr;
	private String scStr;
	private HttpSessionState se;

	public Scheck()
	{
	}

	public Scheck(HttpSessionState se1, HttpCookieCollection ck1, HttpResponse hr1)
	{
		this.se = se1;
		this.ck = ck1;
		this.hr = hr1;
	}

	public Scheck(HttpSessionState se1, HttpCookieCollection ck1, HttpResponse hr1, Page pg1)
	{
		this.se = se1;
		this.ck = ck1;
		this.hr = hr1;
		this.pg = pg1;
	}

	public final void goScriptAdmin()
	{
		if (this.se.getItem("aspuid") == null)
		{
			this.pg.RegisterClientScriptBlock("01", this.scStr);
		}
		else if (!this.se.getItem("aspugroup").toString().equals("Administrators"))
		{
			this.pg.RegisterClientScriptBlock("01", this.scStr);
		}
	}

	public final void goScriptUser()
	{
		if (this.se.getItem("aspuid") == null)
		{
			this.pg.RegisterClientScriptBlock("01", this.scStr);
		}
		else
		{
			String text2 = this.se.getItem("aspugroup").toString();
			if (((!text2.equals("Users")) && (!text2.equals("Administrators"))) && (!text2.equals("Power_Users")))
			{
				this.pg.RegisterClientScriptBlock("01", this.scStr);
			}
		}
	}

	public final void If_Login()
	{
		this.reStr = "../login.aspx?err=zyn_top";
		if (this.se.getItem("hy_num") == null)
		{
			this.hr.Redirect(this.reStr);
		}
		if (this.ck.getItem("hy_hum") == null)
		{
			this.hr.Redirect(this.reStr);
		}
	}

	public final void Login_z8_admin()
	{
		this.reStr = "/z8/alert.aspx?z8_alert=noquanxian";
		if (this.se.getItem("aspuid") == null)
		{
			this.hr.Redirect(this.reStr);
		}
		else if (!this.se.getItem("aspugroup").toString().equals("Administrators"))
		{
			this.hr.Redirect(this.reStr);
		}
	}

	public final void Login_z8_all()
	{
		this.reStr = "/z8/alert.aspx?z8_alert=noquanxian";
		if (this.se.getItem("aspuid") == null)
		{
			this.hr.Redirect(this.reStr);
		}
	}

	public final void Login_z8_Power_Users()
	{
		this.reStr = "/z8/alert.aspx?z8_alert=noquanxian";
		if (this.se.getItem("adpuid") == null)
		{
			this.hr.Redirect(this.reStr);
		}
		else
		{
			String text2 = this.se.getItem("aspugroup").toString();
			if ((!text2.equals("Power_Users")) && (!text2.equals("Administrators")))
			{
				this.hr.Redirect(this.reStr);
			}
		}
	}

	public final void Login_z8_user()
	{
		this.reStr = "/z8/alert.aspx?z8_alert=login";
		if (this.se.getItem("yh_info") == null)
		{
			this.hr.Redirect(this.reStr);
		}
		else
		{
			String text2 = this.se.getItem("aspugroup").toString();
			if (((!text2.equals("Users")) && (!text2.equals("Administrators"))) && (!text2.equals("Power_Users")))
			{
				this.hr.Redirect(this.reStr);
			}
		}
	}

	public final String getReStr()
	{
		return this.reStr;
	}
	public final void setReStr(String value)
	{
		this.reStr = value;
	}

	public final String getScStr()
	{
		return this.scStr;
	}
	public final void setScStr(String value)
	{
		this.scStr = value;
	}
}